var mongoose = require('mongoose')
var Schema = mongoose.Schema

// 创建数据模型
var bookSchema = new Schema({
  name: {
    type: String
  },
  author: {
    type: String
  },
  type: {
    type: String
  },
  cDate: {
    type: Date,
    default: new Date().getTime()
  },
  price: {
    type: Number
  }
})

mongoose.model('book', bookSchema)